package io3;
/**
 * 正序列
 */

import java.io.*;

public class OOSDemo {
    public static void main(String[] args) throws IOException {
        String name="张三";
        int age=15;
        String gender="男";
        String[]otherInfo={"是学生会","黑科技","喜欢唱歌"};
        Student zs=new Student(name,age,gender,otherInfo);
        System.out.println(zs);
        FileOutputStream fos=new FileOutputStream("Student");
        ObjectOutputStream obj=new ObjectOutputStream(fos);
        obj.writeObject(zs);
        System.out.println("输出完毕");
        obj.close();

























//         String name="张三";
//         int age=15;
//         String gender="nan";
//         String[]otherInfo={"是学生","黑龙江","喜欢唱跳"};
//         Student zs=new Student(name,age,gender,otherInfo);
//        System.out.println(zs);
//        FileOutputStream fos=new FileOutputStream("Student.txt");
//        ObjectOutputStream ojb=new ObjectOutputStream(fos);
//        ojb.writeObject(zs);
//        System.out.println("写出完毕");
//        ojb.close();



    }
}
